* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.letter::before {
    width: 100%;
    height: 10vh;
    content: "按钮";
    display: inline-block;
    background-color: #007bff; 
    color: #fff;
    padding: 5px 10px;
    margin-right: 10px;
    cursor: pointer;
}

body {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: sans-serif;
    background-color: #3B4049;
}

.wrapper {
    height: 400px;
    width: 600px;
    background-color: #3760C9;
    position: relative;
    display: flex;
    justify-content: center;
    margin-top:5vh;
    z-index: 0;
} 

.lid {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    border-right: 300px solid transparent;
    border-bottom: 200px solid transparent;
    border-left: 300px solid transparent;
    transform-origin: top;
    transition: transform 0.25s linear;
    z-index: 1;
}

/* Lid when closed */
.lid.one {
    border-top: 200px solid #658ced;
    transform: rotateX(0deg);
    z-index: 3;
    transition-delay: 0.75s;
}

/* Lid when opened */
.lid.two {
    border-top: 200px solid #3760C9;
    transform: rotateX(90deg);
    z-index: 1;
    transition-delay: 0.5s;
}

.envelope {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    border-top: 200px solid transparent;
    border-right: 300px solid #C4DFF0;
    border-bottom: 200px solid #C4DFF0;
    border-left: 300px solid #a4d4f2;
    z-index: 3;
}

.letter {
    position: absolute;
    top: 0;
    width: 80%;
    height: 100%;
    background-color: white;
    border-radius: 15px;
    z-index: 2;
    transition: 0.5s;
}

.letter p {
    text-align: center;
    font-size: 30px;
    margin-top: 30px;
    color: #3B4049;
}

.wrapper:hover .lid.one {
      transform: rotateX(90deg);
      transition-delay: 0s;
}

.wrapper:hover .lid.two {
      transform: rotateX(180deg);
      transition-delay: 0.25s;
}
  
.wrapper:hover .letter {
    transform: translateY(-50px);
    transition-delay: 0.5s;
}

/* pop */
.modal {
  background: dodgerblue;
  height: 1spx;
  overflow: hidden;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease 0.5s, height 0.5s ease;
  width: 0;
  z-index: 4;
}

.content {
  color: transparent;
  font-family: "Consolas", arial, sans-serif;
  font-size: 2em;
  position: absolute;
  top: 50%;
  text-align: center;
  transform: translate3d(0, -50%, 0);
  transition: color 0.5s ease; 
  width: 100%;
  z-index: 4;
}

.content button{
  width: 200px;
  height: 50px;
  opacity: 50%;
  color:#3760C9;
  border-radius: 20px;
  font-size: 22px;
  text-decoration: none;
}

label {
  color: dodgerblue;
  cursor: pointer;
  font-family: "Consolas", arial, sans-serif;
  font-size: 8em;
  position: fixed;
  left: 50%;
  top: 35%;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  transition: color 0.5s ease 0.5s;
  z-index: 4;
}  

label p{
  opacity: 0%;
}

input {
  position: fixed;
  z-index: 4;
  cursor: pointer;
  height: 0;
  opacity: 0;
  width: 0;
}

input:focus {
  outline: none;
}

input:checked {
  height: 40px;
  opacity: 1;
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 5;
  -webkit-appearance: none;
  width: 40px;
}

input:checked::after, input:checked:before {
  border-top: 1px solid #FFF;
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  transform: rotate(45deg);
  width: 100%;
}

input:checked::after {
  transform: rotate(-45deg);
}

input:checked + label {
  color: #FFF;
  transition: color 0.5s ease;
}

input:checked ~ .modal {
  height: 100%;
  width: 100%;
  transition: width 0.5s ease, height 0.5s ease 0.5s;
}

input:checked ~ .modal .content {
  color: #FFF;
  transition: color 0.5s ease 0.5s;
}

input:checked ~ .modal .content a{
  text-decoration: none;
}

input:checked ~ .modal .content a b {
  color: #FFF;
  transition: color 0.5s ease 0.5s;
}



